#include <string.h>
#include <iostream>
using namespace std;

struct Student {
    //默认访问权限是public
    void setId(int id) {    _id = id;    }
    void setName(const char * name) {
        strcpy(_name, name);
    }    
    void print() const {
        cout << "id: " << _id << endl
              << "name:" << _name << endl;
    }
    
    int _id;
    char _name[20];
};

int main() {
    Student s;
    s.setId(100);//error,编译报错
    s.setName("Tom");//error,编译报错
    s.print();//error,编译报错
    return 0;
}

